Bullet-screen comment display

ABSTRACT

A bullet-screen comment display method and apparatus are provided. The bullet-screen comment display method includes: receiving a to-be-displayed bullet-screen comment; determining a target bullet-screen comment display layer and a target bullet-screen comment display track that are associated with the to-be-displayed bullet-screen comment; and displaying, in the target bullet-screen comment display layer, the to-be-displayed bullet-screen comment based on the target bullet-screen comment display track.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority to Chinese Patent Application No.202210164809.2, filed on Feb. 22, 2022, the contents of which are herebyincorporated by reference in their entirety for all purposes.

TECHNICAL FIELD

This application relates to the technical field of generating a visualinterface, and in particular, to a bullet-screen comment display methodand apparatus.

BACKGROUND

With development of Internet technologies, more and more multimediaresources appear in people's lives. A bullet-screen comment associatedwith a multimedia resource is a relatively common function, and is sentby a user watching the multimedia resource.

SUMMARY

Some embodiments of this application provide a bullet-screen commentdisplay method. Some embodiments of this application also provide acomputing device and a non-transitory computer readable storage medium.

According to a first aspect of the embodiments of this application, abullet-screen comment display method is provided, including:

-   -   receiving a to-be-displayed bullet-screen comment;    -   determining a target bullet-screen comment display layer and a        target bullet-screen comment display track that are associated        with the to-be-displayed bullet-screen comment; and    -   displaying, in the target bullet-screen comment display layer,        the to-be-displayed bullet-screen comment based on the target        bullet-screen comment display track.

According to a second aspect of the embodiments of this application, acomputing device is provided and includes:

-   -   a memory and a processor, where    -   the memory is configured to store computer executable        instructions, and the processor is configured to execute the        computer executable instructions to implement the steps of the        bullet-screen comment display method.

According to a third aspect of the embodiments of this application, anon-transitory computer-readable storage medium is provided, where thenon-transitory computer-readable storage medium stores computerexecutable instructions. When the instructions are executed by aprocessor, the steps of the bullet-screen comment display method areimplemented.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a flowchart of a bullet-screen comment display methodaccording to some embodiments of this application;

FIG. 2 is a processing flowchart of a bullet-screen comment displaymethod applied to bullet-screen comment display of middle autumn specialeffects according to some embodiments of this application;

FIG. 3 is a flowchart of a technical solution of bullet-screen commentdisplay of middle autumn special effects according to some embodimentsof this application;

FIG. 4 is a schematic diagram of a bullet-screen comment display layeraccording to some embodiments of this application;

FIG. 5 is a schematic diagram of a same-track insertion rule accordingto some embodiments of this application;

FIG. 6 is a schematic diagram of a bullet-screen comment movement ruleaccording to some embodiments of this application;

FIG. 7 is a schematic diagram of a structure of a bullet-screen commentdisplay apparatus according to some embodiments of this application; and

FIG. 8 is a block diagram of a structure of a computing device accordingto some embodiments of this application.

DETAILED DESCRIPTION OF EMBODIMENTS

Many specific details are described in the following descriptions tofacilitate full understanding of this application. However, thisapplication can be implemented in many other manners different fromthose described herein. A person skilled in the art may make similarpromotion without departing from the connotation of this application.Therefore, this application is not limited to the specificimplementations disclosed below.

Terms used in one or more embodiments of this application are merelyused to describe specific embodiments, but are not intended to limit theone or more embodiments of this application. The terms “a”, “said”, and“the” of singular forms used in one or more embodiments and the appendedclaims of this application are also intended to include plural forms,unless otherwise specified in the context clearly. It should be furtherunderstood that the term “and/or” used in one or more embodiments ofthis application indicates and includes any or all possible combinationsof one or more associated listed items.

It should be understood that although terms such as “first” and “second”can be used in one or more embodiments of this application to describevarious types of information, the information is not limited to theseterms. These terms are only used to differentiate between information ofa same type. For example, without departing from the scope of one ormore embodiments of this application, “first” may also be referred to as“second”, and similarly, “second” may also be referred to as “first”.Depending on the context, for example, the word “if” used herein may beexplained as “while”, “when”, or “in response to determining”.

In this application, a bullet-screen comment display method is provided.This application also relates to a bullet-screen comment displayapparatus, a computing device, and a computer readable storage medium,which are described in detail in the following embodiments.

In the prior art, usually a client that enables a bullet-screen commentdisplay function receives and displays bullet-screen comment informationdelivered by a server. However, in a case in which there is a relativelylarge quantity of bullet-screen comments, usually the bullet-screencomments travel through a display window of the client in batches, andthe bullet-screen comments overlap with each other. Thus, a user whouses the client cannot see clearly bullet-screen comment content, whichgreatly affects viewing experience of the user. The client processes andrenders a large quantity of bullet-screen comment information, butfinally the user cannot see clearly the bullet-screen comment content,which causes a waste of a computing resource, and a large quantity ofstacked bullet-screen comments also causes difficulties to a device thatperforms bullet-screen comment rendering. In addition, because aquantity of data carried in the bullet-screen comment information is toolarge, a client that performs bullet-screen comment processing facesgreat hardware pressure.

In an actual application, in a conventional bullet-screen commentdisplay manner, a bullet-screen comment travels from a right end of amultimedia resource play window to a left end. Although a size and acolor of the bullet-screen comment can be adjusted to a certain extent,a display form of the bullet-screen comment being monotonous cannot becovered up. A more serious problem is that when a quantity ofbullet-screen comments is too large, the bullet-screen comments overlapwith each other during display, which makes it difficult to distinguishbetween bullet-screen comment content, further reduces a user'sperception of the bullet-screen comment, and too much bullet-screencomment processing and rendering are performed. Thus, computingresources of a client are heavily occupied, and a storage control and adata processing control in hardware are under great pressure. However,because the computing resources are occupied, processing and renderingof a multimedia resource by the client are also affected, and play ofmultimedia resources encounters freezing or frame loss.

In view of this, some embodiments of this application provide abullet-screen comment display method, a computing device and anon-transitory computer readable storage medium, so as to resolve aproblem in the prior art that when a large quantity of bullet-screencomments are processed, the bullet-screen comments are stacked with eachother during display, which affects a visual effect, and causes a wasteof a computing resource and heavy hardware pressure on a client.

The bullet-screen comment display method provided in this applicationincludes: receiving a to-be-displayed bullet-screen comment; determininga target bullet-screen comment display layer and a target bullet-screencomment display track that are associated with the to-be-displayedbullet-screen comment; and displaying the to-be-displayed bullet-screencomment based on the target bullet-screen comment display layer and thetarget bullet-screen comment display track. Therefore, theto-be-displayed bullet-screen comment is layer-based and track-basedprocessed, so that the to-be-displayed bullet-screen comment caneffectively use a display area of the bullet-screen comment, and reducepoor perception caused by bullet-screen comment overlap. In addition,reducing overlap can further reduce image rendering pressure of a devicefor displaying the bullet-screen comment, save bullet-screen commentprocessing resources, and improve working efficiency of a bullet-screencomment processing program or apparatus. In addition, different displayrules can be configured in different bullet-screen comment displaylayers and bullet-screen comment display tracks, so that displaypositions and display forms of the bullet-screen comment arediversified, thereby enriching bullet-screen comment display effects.

FIG. 1 is a flowchart of a bullet-screen comment display methodaccording to some embodiments of this application. The method includesthe following steps.

Step S102: Receive a to-be-displayed bullet-screen comment.

The to-be-displayed bullet-screen comment is a bullet-screen commentthat is received by a client and that needs to be displayed in acorresponding multimedia resource play window.

Based on this, the bullet-screen comment that needs to be displayed inthe multimedia resource play window is received by using a datareceiving port of the client.

In some embodiments, considering that in an actual application scenario,different bullet-screen comments are displayed according to differentdisplay policies, to ensure that a bullet-screen comment effect afterdisplay meets a viewing requirement of a user, a display policycorresponding to the to-be-displayed bullet-screen comment needs to bedetected after obtaining the to-be-displayed bullet-screen comment, anda display manner of the to-be-displayed bullet-screen comment isdetermined according to a preset display policy for the to-be-displayedbullet-screen comment. In this embodiment, an exemplary implementationis as follows:

-   -   determining a display policy for the to-be-displayed        bullet-screen comment, and determining whether the display        policy is a target display policy; if yes, performing a step of        determining a target bullet-screen comment display layer and a        target bullet-screen comment display track that are associated        with the to-be-displayed bullet-screen comment; and if no,        processing and displaying the to-be-displayed bullet-screen        comment according to the display policy.

The bullet-screen comment display policy represents a final presentationeffect of the bullet-screen comment in a play interface of a targetmultimedia resource. For example, “member bullet-screen comment” and“noble bullet-screen comment” that are used when the bullet-screencomment is displayed on a video play interface are bullet-screen commentdisplay policies. The target display policy is a display policy fordisplaying a to-be-displayed bullet-screen comment in the bullet-screencomment display method in this application. The target display policymay include multiple configurations. For example, a New Yearbullet-screen comment display policy may include a configuration with ared lantern pattern at the head and the tail of the bullet-screencomment, and a configuration with a firecracker pattern at the head andthe tail of the bullet-screen comment. A specific quantity ofconfiguration forms is determined according to an actual use scenario.This is not limited in this embodiment.

Based on this, a display policy indicating a final presentation effectof the to-be-displayed bullet-screen comment in the target multimediaresource is determined. If the display policy for the to-be-displayedbullet-screen comment is the target presentation policy, step S104 isperformed. In a case in which the display policy for the to-be-displayedbullet-screen comment is not the target presentation policy, display isperformed according to the display policy for the to-be-displayedbullet-screen comment.

It should be noted that, in a case in which display policies in theto-be-displayed bullet-screen comment are different, priorities may beset for different display policies, and a bullet-screen comment of abullet-screen comment display policy with a highest priority ispreferentially displayed, and bullet-screen comments of otherbullet-screen comment display polices are discarded; or bullet-screencomments of different types of bullet-screen comment display policiesare simultaneously displayed; or different bullet-screen comment levelsare divided for bullet-screen comments with different display policiesfor layer-based display. A specific display form is determined by usingan actual scenario. This is not limited in this embodiment.

For example, a user A watches a video B by using a mobile phone A, themobile phone A receives a bullet-screen comment 1, and then detects thata display policy for the bullet-screen comment 1 is a Spring Festivalbullet-screen comment display policy, and the Spring Festivalbullet-screen comment display policy is a target display policy. In thiscase, the bullet-screen comment 1 performs subsequent steps of thebullet-screen comment display method in this embodiment of thespecification.

In summary, the display policy for the to-be-displayed bullet-screencomment is confirmed, so that the to-be-displayed bullet-screen commentcan be subsequently displayed according to a preset display policy, anda display process of the to-be-displayed bullet-screen comment isensured according to an expectation, so that the display process iscontrollable.

Step S104: Determine a target bullet-screen comment display layer and atarget bullet-screen comment display track that are associated with theto-be-displayed bullet-screen comment.

After the to-be-displayed bullet-screen comment is received, abullet-screen comment display layer in which the to-be-displayedbullet-screen comment is located and a bullet-screen comment displaytrack in which the to-be-displayed bullet-screen comment is located needto be determined for the to-be-displayed bullet-screen comment.

The target bullet-screen comment display layer may be understood as abullet-screen comment display layer in which the to-be-displayedbullet-screen comment is displayed, and the target bullet-screen commentdisplay track may be understood as a bullet-screen comment display trackin which the to-be-displayed bullet-screen comment is displayed. Itshould be noted that the bullet-screen comment display layer is an areathat exists in a multimedia resource play window, the bullet-screencomment is displayed in this area, and the bullet-screen comment displaytrack is an area divided in the bullet-screen comment display layer, andis used to limit an action track that the bullet-screen comment isdisplayed in the bullet-screen comment display layer. Therefore, boththe target bullet-screen comment display layer and the targetbullet-screen comment display track are associated with theto-be-displayed bullet-screen comment, that is, the target bullet-screencomment display track exists in the target bullet-screen comment displaylayer, and the to-be-displayed bullet-screen comment is displayed in thetarget bullet-screen comment display track in the target bullet-screencomment display layer.

Based on this, after the to-be-displayed bullet-screen comment isreceived, a display area of the to-be-displayed bullet-screen comment inthe multimedia resource play window, that is, the target bullet-screencomment display layer, is determined, and a bullet-screen commentdisplay track of the to-be-displayed bullet-screen comment in the targetbullet-screen comment display layer, that is, the target bullet-screencomment display track, is determined.

In some embodiments, before the target bullet-screen comment displaylayer is selected, a bullet-screen comment display layer needs to beconstructed, and a bullet-screen comment display track in thebullet-screen comment display layer further needs to be created. In thisembodiment, an exemplary implementation is as follows:

-   -   receiving bullet-screen comment display rule information and        bullet-screen comment display layer information that are        delivered by a server; creating a bullet-screen comment display        layer and a bullet-screen comment display track in the        bullet-screen comment display layer according to the        bullet-screen comment display layer information; and configuring        a rule for the bullet-screen comment display layer and a        corresponding bullet-screen comment display track based on the        bullet-screen comment display rule information.

The bullet-screen comment display rule information and the bullet-screencomment display layer information are delivered by the server, and theinformation is formulated by a player maintenance party corresponding tothe multimedia resource play window. For example, for a video website, adeveloper or a maintainer of the video website formulates thebullet-screen comment display rule information and the bullet-screencomment display layer information. When the user logs in to the videowebsite to watch a video, the bullet-screen comment display ruleinformation and the bullet-screen comment display layer information aredelivered to the client of the user.

The bullet-screen comment display layer information may be understood asinformation specifying attributes such as a size, a shape, a position,and an overlap sequence of the bullet-screen comment display layer andthe bullet-screen comment display track in the multimedia resource playwindow. It should be noted that the bullet-screen comment display ruleinformation is set to create the bullet-screen comment display layer andthe bullet-screen comment display track, and a type of informationcarried therein may be set according to an actual use scenario. This isnot limited in this embodiment of this specification.

The bullet-screen comment display rule information may be understood asspecifying a rule to be executed for a displayed bullet-screen commentwhen the created bullet-screen comment display layer and bullet-screencomment display track display the bullet-screen comment. It should benoted that the specific information type in the bullet-screen commentdisplay rule information is also set according to an actual usescenario. This is not limited in this embodiment of this specification.

Based on this, the maintainer of the player formulates the bullet-screencomment display rule information and the bullet-screen comment displaylayer information, and then delivers, by using the server, the twoinformation to a client that uses the player to play a multimediaresource. The client determines, based on the bullet-screen commentdisplay layer information, attributes such as a size, a shape, aquantity, and an overlap layer level of the bullet-screen commentdisplay layer, as well as attributes such as a shape and a width of thebullet-screen comment display track, the bullet-screen comment displaylayer, and a position of the bullet-screen comment display layer onwhich the bullet-screen comment display track is located, and createsthe bullet-screen comment display layer and the bullet-screen commentdisplay track. Then, the display rule, the movement rule, and the likeused when the bullet-screen comment display layer and the bullet-screencomment display track display the bullet-screen comment are displayedaccording to the bullet-screen comment display rule information.

Still using the foregoing example, the user A watches the video B byusing the mobile phone A, and a player C plays the video B. Thedevelopment company of the player C formulates the bullet-screen commentdisplay rule information and the bullet-screen comment display layerinformation, and then delivers the two information to the mobile phone Aby using the server. The player C in the mobile phone A creates,according to the bullet-screen comment display layer information, abullet-screen comment display layer 1 and a bullet-screen commentdisplay layer 2 that have a same shape as a rectangular play window ofthe player C, where the bullet-screen comment display layer 1 is abovethe bullet-screen comment display layer 2. A bullet-screen commentdisplay layer 3 is created which is similar in shape to the play windowbut corresponding side length is one half of the side length of theplaying window, and whose geometric center coincides with that of theplay window. Then, bullet-screen comment display tracks in thebullet-screen comment display layers 1, 2, and 3 are configured based onthe bullet-screen comment display rule information, to obtain a verticaldirection of the bullet-screen comment display layer 1, where a width isone tenth of a length of a bottom side of the bullet-screen commentdisplay layer 1, and 10 rectangular bullet-screen comment display tracksare densely arranged; obtain a horizontal direction of the bullet-screencomment display layer 2, where a width is one ninth of a side length ofthe bullet-screen comment display layer 2, a spacing is one third of aside length of the bullet-screen comment display layer 2, and threerectangular bullet-screen comment display tracks are arranged from anedge of the bullet-screen comment display layer 2; and obtain a startpoint of the bullet-screen comment display layer 3 on a bottom side ofthe bullet-screen comment display layer 3, an end point of thebullet-screen comment display layer 3 on a right side of thebullet-screen comment display layer 3, a center thereof is at a lowerright corner of the bullet-screen comment display layer 3, a widththereof is one tenth of the length of the bottom side of thebullet-screen comment display layer 3, and 10 fan-ring bullet-screencomment display tracks are densely arranged.

Then, based on the bullet-screen comment display rule information, thebullet-screen comment display layer 1 is configured to display only thebullet-screen comment sent by the member user, the bullet-screen commentdisplay layer 2 is configured to display only the bullet-screen commentsent by the user A, and the bullet-screen comment display layer 3 isconfigured to display the remaining bullet-screen comment. It isconfigured that bullet-screen comments displayed on the 10 bullet-screencomment display tracks in the bullet-screen comment display layer 1according to the bullet-screen comment display rule information areshown in red regular script, the front part of the bullet-screen commentcarries a member mark, and the bullet-screen comment is slidablydisplayed at a velocity of 1 mm/s from bottom to top; it is configuredthat bullet-screen comments displayed on two bullet-screen commentdisplay tracks adjacent to the bullet-screen comment display layer 2 inthe bullet-screen comment display layer 2 are shown in black Songtypeface, and are slidably displayed from left to right at an initialvelocity of 2 mm/s and an acceleration of 2 mm/s², and the bullet-screencomment in the middle bullet-screen comment display track is in whiteSong typeface and slidably displayed from right to left at a velocity of1 mm/s; it is configured that bullet-screen comments displayed in the 10bullet-screen comment display tracks of the bullet-screen commentdisplay layer 3 are shown in white regular script, and the bullet-screencomments are displayed along the bullet-screen comment display track ata velocity of 1 mm/s.

In conclusion, the bullet-screen comment display layer and thebullet-screen comment display track are created by using the foregoingmethod, which provides a basis for displaying the to-be-displayedbullet-screen comment. It should be noted that, by using thebullet-screen comment display rule information and the bullet-screencomment display layer information, a bullet-screen comment switch may beconfigured in the multimedia resource display window, and acorresponding bullet-screen comment display layer is not displayed in acorresponding bullet-screen comment display track, so that the user canselectively display the bullet-screen comment to be displayed in theexpected bullet-screen comment display layer or the expectedbullet-screen comment display track.

In some embodiments, because the to-be-displayed bullet-screen commentis displayed in the target bullet-screen comment display layer, when themultimedia resource play window needs to display the to-be-displayedbullet-screen comment, the target bullet-screen comment display layerneeds to be determined in all bullet-screen comment display layers basedon the to-be-displayed bullet-screen comment. In this embodiment, anexemplary implementation is as follows:

-   -   determining bullet-screen comment state information of the        to-be-displayed bullet-screen comment; and determining, from at        least one preset bullet-screen comment display layer according        to the bullet-screen comment state information, the target        bullet-screen comment display layer associated with the        to-be-displayed bullet-screen comment.

The bullet-screen comment state information may be understood as anattribute of the to-be-displayed bullet-screen comment, and may includeinformation such as a bullet-screen comment source, a bullet-screencomment sender attribute, and a bullet-screen comment configuration. Inaddition, the bullet-screen comment state information may furtherinclude a specific selection rule, such as random selection, or abullet-screen comment display layer with a highest priority. Theselection rule included in the bullet-screen comment state informationis set according to an actual use scenario, and is not limited in thisembodiment. The bullet-screen comment display layer may be understood asplanning for a bullet-screen comment display area in a process ofdisplaying a bullet-screen comment. It should be noted that thebullet-screen comment display layer may not only be one layer. Whenoverlap positions of multiple bullet-screen comment display layers aregenerated, the bullet-screen comment display layers have priorities, abullet-screen comment display layer with a higher priority is above abullet-screen comment display layer with a lower priority, andbullet-screen comment information in the bullet-screen comment displaylayer with a higher priority may overlay or shield bullet-screen commentinformation in the bullet-screen comment display layer with a lowerpriority in a display process.

Based on this, the bullet-screen comment state information of theto-be-displayed bullet-screen comment is determined, and thebullet-screen comment display layer of the to-be-displayed bullet-screencomment is determined according to content indicated in thebullet-screen comment state information, where the selectedbullet-screen comment display layer is the target bullet-screen commentdisplay layer. Therefore, a determining process of the targetbullet-screen comment display layer may be understood in actualapplication as follows: According to whether the to-be-displayedbullet-screen comment is sent by a member user, in a case in which theto-be-displayed bullet-screen comment is sent by a member user, theto-be-displayed bullet-screen comment is displayed in a bullet-screencomment display layer dedicated to the member user; and if theto-be-displayed bullet-screen comment is not sent by a member user, theto-be-displayed bullet-screen comment is displayed in a bullet-screencomment display layer dedicated to a non-member user. Alternatively,depending on whether a bullet-screen comment mode is enabled for theto-be-displayed bullet-screen comment, the to-be-displayed bullet-screencomment is displayed on a dedicated bullet-screen comment display layerif enabled, and the to-be-displayed bullet-screen comment is displayedon another bullet-screen comment display layer if not enabled. It shouldbe noted that there are multiple selection criteria for thebullet-screen comment display layer. A specific selection manner of thebullet-screen comment display layer is determined according to an actualapplication scenario. This is not limited in this embodiment. Similarly,for the bullet-screen comment state information including the selectioncriteria of the bullet-screen comment display layer, a type ofinformation related to the to-be-displayed bullet-screen commentincluded therein is not limited in this embodiment.

According to the foregoing example, the bullet-screen comment stateinformation of the bullet-screen comment 1 is determined, where thebullet-screen comment 1 is marked as a bullet-screen comment sent by theuser A. Therefore, the bullet-screen comment display layer 2 isdetermined as the target bullet-screen comment display layer.

In conclusion, the bullet-screen comment display layer in which theto-be-displayed bullet-screen comment is located is determined by usingthe bullet-screen comment state information of the to-be-displayedbullet-screen comment. In an implemented bullet-screen comment displayprocess, the bullet-screen comment is displayed in layers, therebyenriching display forms of the bullet-screen comment. In addition,different bullet-screen comment display layers have different displayrules, so that the bullet-screen comment display forms are moreabundant. In this layer-based display form, bullet-screen comments areclassified and displayed on different display layers. This display formcan effectively display a large quantity of bullet-screen comments at asame time, reduce calculation and rendering pressure of a device, andreduce a system freezing problem.

In some embodiments, in a process of determining the targetbullet-screen comment display layer of the to-be-displayed bullet-screencomment, the bullet-screen comment display layer of the to-be-displayedbullet-screen comment may be determined based on that theto-be-displayed bullet-screen comment is sent by a user of a currentvideo play device or sent by another user, to select the targetbullet-screen comment display layer. In this embodiment, an exemplaryimplementation is as follows:

-   -   determining an obtaining path of the to-be-displayed        bullet-screen comment; and determining the bullet-screen comment        state information of the to-be-displayed bullet-screen comment        based on the obtaining path; and correspondingly, the        determining, according to the bullet-screen comment state        information, the target bullet-screen comment display layer        associated with the to-be-displayed bullet-screen comment        includes:    -   in a case in which the bullet-screen comment state information        is guest bullet-screen comment state information, selecting a        guest bullet-screen comment display layer associated with the        to-be-displayed bullet-screen comment as the target        bullet-screen comment display layer; and in a case in which the        bullet-screen comment state information is host bullet-screen        comment state information, selecting a host bullet-screen        comment display layer associated with the to-be-displayed        bullet-screen comment as the target bullet-screen comment        display layer.

The obtaining route of the to-be-displayed bullet-screen comment may beunderstood as follows: The to-be-displayed bullet-screen comment is abullet-screen comment sent by another user against the target multimediaresource or a bullet-screen comment sent by the user against the targetmultimedia resource to a client operated by the user; and the hostbullet-screen comment state information may be understood as recordingthe bullet-screen comment state information of the to-be-displayedbullet-screen comment that is sent by the user to the client, and theguest bullet-screen comment state information may be understood asrecording the bullet-screen comment state information of theto-be-displayed bullet-screen comment that is delivered by the server.The host bullet-screen comment display layer is a bullet-screen commentdisplay layer that is used to display a bullet-screen comment that issent by a user for a target multimedia resource to a client operated bythe user, and the guest bullet-screen comment display layer is abullet-screen comment display layer that is used to display abullet-screen comment that is sent by another user for the target mediaresource and that is delivered by the server.

Based on this, it is determined whether the to-be-displayedbullet-screen comment is a bullet-screen comment sent by another userdelivered from the client or a bullet-screen comment sent by the user tothe client operated by the user. In the former case, the bullet-screencomment state information of the to-be-displayed bullet-screen commentis the guest bullet-screen comment state information, and in the lattercase, the bullet-screen comment state information of the to-be-displayedbullet-screen comment is the host bullet-screen comment stateinformation. In a case in which the bullet-screen comment stateinformation is the guest bullet-screen comment state information, adedicated bullet-screen comment display layer of the bullet-screencomment sent by another user delivered by the server is selected as theguest bullet-screen comment display layer, and in a case in which thebullet-screen comment state information is the host bullet-screencomment state information, a dedicated bullet-screen comment displaylayer of the bullet-screen comment sent by the user to the clientoperated by the client is selected as the host bullet-screen commentdisplay layer.

Still using the foregoing example, it is determined that thebullet-screen comment 1 is a bullet-screen comment that is sent by theuser A to the mobile phone A, that the bullet-screen comment stateinformation of the bullet-screen comment 1 is the host bullet-screencomment state information, and the bullet-screen comment display layer 2that only displays the bullet-screen comment state information is thehost state bullet-screen comment state information is used as the targetbullet-screen comment display layer of the bullet-screen comment 1.

In conclusion, by using the obtaining path of the to-be-displayedbullet-screen comment, the bullet-screen comment state information ofthe to-be-displayed bullet-screen comment can be learned, and thebullet-screen comment state information is obtained in an intuitive andeasy manner.

In some embodiments, when the to-be-displayed bullet-screen comment isdisplayed, in addition to determining the bullet-screen comment displaylayer on which the to-be-displayed bullet-screen comment needs to bedisplayed, the bullet-screen comment display track on which thebullet-screen comment needs to be displayed needs to be determined. Inthis embodiment, an exemplary implementation is as follows:

-   -   determining bullet-screen comment display track information of        the to-be-displayed bullet-screen comment; and determining, from        at least one preset bullet-screen comment display track        according to the bullet-screen comment display track        information, the target bullet-screen comment display track        associated with the to-be-displayed bullet-screen comment.

The bullet-screen comment display track information may be understood asincluding a selection rule for selecting a bullet-screen comment displaytrack to display the to-be-displayed bullet-screen comment. It should benoted that the selection rule for selecting a bullet-screen commentdisplay track may be random selection, may be left-to-right ortop-to-bottom, or the like. A specific setting manner is determinedaccording to an actual use scenario, and is not limited in thisembodiment.

Based on this, the bullet-screen comment display track informationincluding a selection rule for selecting a bullet-screen comment displaytrack to display the to-be-displayed bullet-screen comment is included,and the bullet-screen comment display track is selected from allbullet-screen comment display tracks in the target bullet-screen commentdisplay layer according to the bullet-screen comment display trackinformation, and the to-be-displayed bullet-screen comment is displayedin the target bullet-screen comment display track.

Still using the foregoing example, it is determined according to thebullet-screen comment display track information of the bullet-screencomment 1. A manner of determining the bullet-screen comment displaytrack information of the bullet-screen comment 1 is random selection,and based on the bullet-screen comment display track information, it isdetermined that the target bullet-screen comment display track is thetop bullet-screen comment display track in the bullet-screen commentdisplay layer 2.

In conclusion, the target bullet-screen comment display track of theto-be-displayed bullet-screen comment is determined by using thebullet-screen comment display track information, so that a displayposition of the to-be-displayed bullet-screen comment is determined, anda display track of the to-be-displayed bullet-screen comment isdetermined.

Step S106: Display, in the target bullet-screen comment display layer,the to-be-displayed bullet-screen comment based on the targetbullet-screen comment display track.

In some embodiments, after the target bullet-screen comment displaylayer and the target bullet-screen comment display track that arecorresponding to the to-be-displayed bullet-screen comment aredetermined, the to-be-displayed bullet-screen comment further needs tobe displayed.

Based on this, in a process of displaying the to-be-displayedbullet-screen comment based on the target bullet-screen comment displaylayer and the target bullet-screen comment display track, because ofdifferent characteristics of the bullet-screen comment display layer andthe bullet-screen comment display track, when the to-be-displayedbullet-screen comment is displayed in the target bullet-screen commentdisplay layer and the target bullet-screen comment display track, theto-be-displayed bullet-screen comment needs to comply with a displayrule of the target bullet-screen comment display layer and the targetbullet-screen comment display track.

In some embodiments, to ensure that a large quantity of bullet-screencomments in to-be-displayed bullet-screen comments are not displayedsimultaneously at a same moment, causing a problem of crowded stackingbetween the bullet-screen comments, and increasing a processing pressureof a bullet-screen comment display device, the bullet-screen comments inthe display process may be deleted to some extent. An exemplaryimplementation. of this embodiment is as follows:

-   -   detecting whether a displayed bullet-screen comment exists in        the target bullet-screen comment display track; if a displayed        bullet-screen comment does not exist, performing the step of        displaying, in the target bullet-screen comment display layer;        the to-be-displayed bullet-screen comment based on the target        bullet-screen comment display track; if a displayed        bullet-screen comment exists, detecting whether there is a        bullet-screen comment overlap area between the displayed        bullet-screen comment and the to-be-displayed bullet-screen        comment; if no, performing the step of displaying, in the target        bullet-screen comment display layer, the to-be-displayed        bullet-screen comment based on the target bullet-screen comment        display track; and if yes, deleting the to-be-displayed        bullet-screen comment.

The displayed bullet-screen comment may be understood as a bullet-screencomment being displayed, and the bullet-screen comment overlap area maybe understood as two bullet-screen comments being displayed existing inthis area at a same moment.

Based on this, first, the target bullet-screen comment display track isdetected, and whether a bullet-screen comment being displayed exists inthe target bullet-screen comment display track is detected. If nobullet-screen comment being displayed exists in the target bullet-screencomment display track, the to-be-displayed bullet-screen comment isdisplayed in the target bullet-screen comment display track. If abullet-screen comment being displayed exists in the target bullet-screencomment display track, second detection needs to be performed to detectwhether there is overlap between the bullet-screen comment beingdisplayed in the target bullet-screen comment display track and theto-be-displayed bullet-screen comment, and when there is overlap, theto-be-displayed bullet-screen comment is deleted and not displayed. Whenthere is no overlap, the to-be-displayed bullet-screen comment isdisplayed. It should be noted that, when it is determined whether thereis overlap between the to-be-displayed bullet-screen comment and thebullet-screen comment being display in the target bullet-screen commentdisplay track, a time relationship between the bullet-screen commentbeing displayed and the to-be-displayed bullet-screen comment may beselected to determine, for example, a start time of determining that theto-be-displayed bullet-screen comment enters a target bullet-screencomment display area, and an end time of completing display of theto-be-displayed bullet-screen comment in the target bullet-screencomment display area. Comparing the start time with the end time, if theend time is greater than or equal to the start time, it indicates thatthe bullet-screen comment being displayed completely overlaps from astart point of the target bullet-screen comment display track, and allcontent of the bullet-screen comment is completely displayed. In thiscase, the to-be-displayed bullet-screen comment starts to be displayedfrom the start point of the target bullet-screen comment display track,so that it can be determined that there must be no overlap between thetwo. In addition, a method such as determining whether there is overlapbetween the bullet-screen comment being displayed and theto-be-displayed bullet-screen comment in the target bullet-screencomment display track may further be used. A specific determining methodis determined according to an actual use scenario, and is not limited inthis embodiment.

Still using the foregoing example, in the top bullet-screen commentdisplay track in the bullet-screen comment display layer 2, thebullet-screen comment 2 that is being displayed slides from left toright, a time at which the bullet-screen comment 2 completely slidesfrom the left side of the target bullet-screen comment display track isdenoted as t2, and a time at which the bullet-screen comment 1 isdisplayed is t1, and t1<t2 is determined. In this case, thebullet-screen comment 1 is displayed based on a corresponding displayrule of the target bullet-screen comment display track.

In conclusion, by processing the to-be-displayed bullet-screen commentin the foregoing method, a case in which the bullet-screen comments donot overlap with each other in a process of displaying the bullet-screencomments can be implemented, rendering pressure of the apparatus on thebullet-screen comment information is reduced, fluency of thebullet-screen comment is ensured, and a processing resource is saved.

In some embodiments, when the to-be-displayed bullet-screen comment isbeing displayed, to ensure diversification of the to-be-displayedbullet-screen comment display process; display information of theto-be-displayed bullet-screen comment needs to be configured based onthe target bullet-screen comment display track. In this embodiment, anexemplary implementation is as follows:

-   -   determining a bullet-screen comment display rule corresponding        to the target bullet-screen comment display track; updating        bullet-screen comment size information, bullet-screen comment        font information, bullet-screen comment color information, and        bullet-screen comment configuration information of the        to-be-displayed bullet-screen comment based on the bullet-screen        comment display rule, to obtain a first target bullet-screen        comment; and displaying the first target bullet-screen comment        in the target bullet-screen comment display layer.

The bullet-screen comment size information may be understood asinformation that includes a font size in a process of displaying theto-be-displayed bullet-screen comment. The bullet-screen comment fontinformation may be understood as information that includes a font usedin a process of displaying the bullet-screen comment. The bullet-screencomment color information may be understood as information that includesa color presented in a display process of the to-be-displayedbullet-screen comment; The bullet-screen comment configurationinformation may be understood as including some dedicated accessoriesconfigured in a display process of the to-be-displayed bullet-screencomment, such as a member identifier, a spring festival lantern, a colorlight, a Chinese knot, and tassels, and a specific included style is setaccording to an actual use scenario, which is not limited in thisembodiment.

Based on this, the bullet-screen comment display rule configured for thetarget bullet-screen comment display track is determined, andinformation about a size, a font, a color, an accessory, and the like ofthe to-be-displayed bullet-screen comment is updated according to thebullet-screen comment display rule corresponding to the targetbullet-screen comment display track. In this case, the updatedbullet-screen comment is a first target bullet-screen comment, and theobtained first target bullet-screen comment is displayed in the targetbullet-screen comment display layer.

Still using the foregoing example, the bullet screen comment displayrule for the top bullet-screen comment display track of thebullet-screen comment display layer 2 is obtained as that a width isone-ninth of a side length of the bullet-screen comment display layer 2,and the bullet-screen comment is shown in black Song typeface. Thebullet-screen comment 1 is configured based on this bullet-screencomment display rule, to obtain a first target bullet-screen commentshown in black Song typeface in which a size of each word in thebullet-screen comment is one-ninth of the side length of thebullet-screen comment display layer 2. The first target bullet-screencomment is displayed on the bullet-screen comment display track at thetop of the bullet-screen comment display layer 2. It should be notedthat, in a process of configuring the to-be-displayed bullet-screencomment based on the bullet-screen comment display rule, all displayinformation in the to-be-displayed bullet-screen comment display processmay not be updated. For example, the bullet-screen comment configurationinformation in the to-be-displayed bullet-screen comment displayinformation is not updated in the foregoing example. In this case, adefault configuration solution may also be set, and update of theto-be-displayed bullet-screen comment is selected without performingtargeted update. Certainly, a to-be-displayed bullet-screen comment thatdoes not update all display information may not be displayed, and can bedisplayed only after all display information is updated. A requirementfor updating the display information of the to-be-displayedbullet-screen comment may be various. A specific manner is limited by anactual use scenario, and is not limited in this embodiment.

In conclusion, by using the foregoing method, the display form of theto-be-displayed bullet-screen comment is determined, and diversity in aprocess of displaying the to-be-displayed bullet-screen comment isincreased. In addition, the bullet-screen comment display rule of thebullet-screen comment display track may be newly configured, and may beused as a template for performing a new configuration of thebullet-screen comment display type, thereby reducing a waste ofdevelopment resources.

In some embodiments, to implement diversification of the to-be-displayedbullet-screen comment display process, in addition to processing theconfiguration of the to-be-displayed bullet-screen comment displayprocess, movement information of the to-be-displayed bullet-screencomment may be further configured. In this embodiment, an exemplaryimplementation is as follows:

-   -   determining a bullet-screen comment movement rule corresponding        to the target bullet-screen comment display track; updating        bullet-screen comment velocity information, bullet-screen        comment acceleration information, and bullet-screen comment        angular velocity information of the to-be-displayed        bullet-screen comment based on the bullet-screen comment        movement rule, to obtain a second target bullet-screen comment;        and displaying the second target bullet-screen comment in the        target bullet-screen comment display layer.

The bullet-screen comment movement rule may be understood as a rule thatspecifies a movement form of the to-be-displayed bullet-screen comment.The bullet-screen comment movement velocity information may beunderstood as information that includes an initial velocity at whichmovement is performed in a process of displaying the to-be-displayedbullet-screen comment. The bullet-screen comment accelerationinformation may be understood as information that includes anacceleration for moving in a process of displaying the to-be-displayedbullet-screen comment. The bullet-screen comment angular velocityinformation may be understood to include information about a movementangular velocity in a process of displaying the to-be-displayedbullet-screen comment. It should be noted that the angular velocityinformation may further include information about auto rotation andrevolution, where auto rotation represents information about arotational angular velocity for rotating around a central point of theto-be-displayed bullet-screen comment, and revolution indicates theangular velocity at which the to-be-displayed bullet-screen commentrotates around a certain point that is stationary relative to the targetbullet-screen comment display layer or the target bullet-screen commentdisplay track during the display process of the to-be-displayedbullet-screen comment display. It should be noted that configuration ofthe movement rule of the to-be-displayed bullet-screen comment issimilar to update of the display rule of the to-be-displayedbullet-screen comment, and may be set in multiple different manners,which is not limited in this embodiment.

Based on this, a rule for configuring the target bullet-screen commentdisplay track in the display process of the to-be-displayedbullet-screen comment is determined, to obtain a bullet-screen commentmovement rule that specifies that the to-be-displayed bullet-screencomment is to be displayed on the target bullet-screen comment displaytrack, and to update, based on the bullet-screen comment movement rule,bullet-screen comment velocity information, bullet-screen commentacceleration information, and bullet-screen comment angular velocityinformation of the to-be-displayed bullet-screen comment, to obtain asecond target bullet-screen comment that meets the bullet-screen commentmovement rule specified in the target bullet-screen comment displaytrack, and display the second target bullet-screen comment in the targetbullet-screen comment display layer.

Still using the foregoing example, a movement rule that is configured byusing the top bullet-screen comment track of the bullet-screen commentdisplay layer 2 is as follows: The bullet-screen comment is displayed bysliding from left to right at an initial velocity of 2 mm/s and anacceleration of 2 mm/s². The bullet-screen comment 1 is configured basedon this movement rule, to obtain the second target bullet-screen commentwhose movement rule meets the requirement of the top bullet-screencomment track of the bullet-screen comment display layer 2. The obtainedsecond target bullet-screen comment is displayed in the topbullet-screen comment display track of the bullet-screen comment displaylayer 2.

In conclusion, the to-be-displayed bullet-screen comment is configuredbased on the movement rule of the target bullet-screen comment displaytrack, so that a process of moving the to-be-displayed bullet-screencomment is enriched, and interest of displaying the to-be-displayedbullet-screen comment is increased. In addition, movement forms similarto objects such as “cloud”, “raindrop”, and “meteor” may be implementedby configuring the movement rule of the to-be-displayed bullet-screencomment, and an aesthetic sense of the to-be-displayed bullet-screencomment display process is increased.

In some embodiments, in addition to the foregoing separately updatingthe display information and the movement information of theto-be-displayed bullet-screen comment, a process of simultaneouslyupdating the display information and the movement information of theto-be-displayed bullet-screen comment may be further performed. In thisembodiment, an exemplary implementation is as follows:

-   -   determining a bullet-screen comment display rule and a        bullet-screen comment movement rule that are corresponding to        the target bullet-screen comment display track; updating display        information of the to-be-displayed bullet-screen comment based        on the bullet-screen comment display rule, and updating movement        information of the to-be-displayed bullet-screen comment based        on the bullet-screen comment movement rule to obtain a third        target bullet-screen comment; and displaying the third target        bullet-screen comment in the target bullet-screen comment        display layer.

The display rule may be understood as a combination of bullet-screencomment size information, bullet-screen comment font information,bullet-screen comment color information, and bullet-screen commentconfiguration information that are related to the to-be-displayedbullet-screen comment. The movement rule may be understood as acombination of to-be-displayed bullet-screen comment-relatedbullet-screen comment velocity information, bullet-screen commentacceleration information, and bullet-screen comment angular velocityinformation.

Based on this, a process of configuring the to-be-displayedbullet-screen comment is similar to the foregoing described process ofconfiguring the to-be-displayed bullet-screen comment, and details arenot described herein again.

In conclusion, an overall display effect in a process of displaying theto-be-displayed bullet-screen comment is determined by configuring thedisplay rule and the movement rule of the to-be-displayed bullet-screencomment.

The bullet-screen comment display method provided in this applicationincludes: receiving a to-be-displayed bullet-screen comment; determininga target bullet-screen comment display layer and a target bullet-screencomment display track that are associated with the to-be-displayedbullet-screen comment; and displaying the to-be-displayed bullet-screencomment based on the target bullet-screen comment display layer and thetarget bullet-screen comment display track. Therefore, theto-be-displayed bullet-screen comment can effectively use a display areaof the bullet-screen comment, reduce poor perception caused bybullet-screen comment overlap, save bullet-screen comment processingresources, and improve working efficiency of a bullet-screen commentprocessing program or apparatus. In addition, different display rulescan be configured in different bullet-screen comment display layers andbullet-screen comment display tracks, so that display positions anddisplay forms of the bullet-screen comment are diversified, therebyenriching bullet-screen comment display effects.

With reference to FIG. 2 , the following further describes thebullet-screen comment display method by using an example in which thebullet-screen comment display method provided in this application isused to display a middle autumn special effect bullet-screen comment.FIG. 2 shows a processing flowchart of a bullet-screen comment displaymethod applied to bullet-screen comment display of middle autumn specialeffects according to some embodiments of this application. The methodspecifically includes the following steps:

Step S202: Receive a to-be-displayed bullet-screen comment.

In an exemplary embodiment, a user A watches a video C by using a mobilephone B, and obtains a bullet-screen comment D sent by the user A byusing the mobile phone B for the video C. In addition, it further needsto determine whether the bullet-screen comment D is displayed by usingthe middle autumn special effect bullet-screen comment. In a case ofyes, step S204 is performed. In a case of no, display is performed basedon a bullet-screen comment display form of the bullet-screen comment D.It can be learned from a flowchart of bullet-screen comment displaytechnical solution of medium autumn special effects shown in FIG. 3 ,that is, after receiving the bullet-screen comment broadcast, that is,after receiving the foregoing to-be-displayed bullet-screen comment, itis determined whether the bullet-screen comment broadcast is enabled inthe middle autumn special effect bullet-screen comment display mode. Ifyes, subsequent processing and displaying of the bullet-screen commentbroadcast continue; otherwise, the received bullet-screen commentbroadcast is processed and displayed according to an originalbullet-screen comment logic. Here, the bullet-screen comment D isdisplayed in the form of a middle autumn special effect bullet-screencomment.

Step S204: Determine an obtaining path of the to-be-displayedbullet-screen comment.

In an exemplary embodiment, it is determined that the bullet-screencomment D is a bullet-screen comment delivered by a server and receivedby the mobile phone B.

Step S206: Determine the bullet-screen comment state information of theto-be-displayed bullet-screen comment based on the obtaining path.

Because the bullet-screen comment D is a bullet-screen comment deliveredby the server and received by the mobile phone B, it is determined thatthe bullet-screen comment D is a guest bullet-screen comment, andbullet-screen comment state information of the bullet-screen comment Dis guest bullet-screen comment state information.

Step S208: Determine, from at least one preset bullet-screen commentdisplay layer according to the bullet-screen comment state information,the target bullet-screen comment display layer associated with theto-be-displayed bullet-screen comment.

In an exemplary embodiment, according to the guest bullet-screen commentstate information corresponding to the bullet-screen comment D, a fourthlayer, that is, a bottom-layer bullet-screen comment display layer, isdetermined as the target bullet-screen comment display layer by means ofrandom selection. FIG. 4 is a schematic diagram of a bullet-screencomment display layer. A width of a bullet-screen comment display trackin a host bullet-screen comment display layer is 180 px. Only a type Aof a middle autumn special effect bullet-screen comment form isdisplayed in the first layer of a guest bullet-screen comment displaylayer. The type A of the middle autumn special effect bullet-screencomment form is in red regular script, and each of the head and the tailof the bullet-screen comment has a decoration pattern with one monthcake. In addition, a width of the bullet-screen comment display track inthe bullet-screen comment display layer is 180 px. In the second layerof the guest bullet-screen comment display layer, type B\C middle autumnspecial effect bullet-screen comments are displayed. In type B, thespecial effect bullet-screen comment is shown in white Song typeface,and the head part has a decoration pattern with a jade rabbit. In typeC, the special effect Song typeface is shown in black Song typeface, andthe tail part has a decoration pattern with a jade rabbit. In addition,a width of the bullet-screen comment display track in the bullet-screencomment display layer is 70 px. This setting is used to display arelatively small quantity of bullet-screen comments in the second layerof the guest bullet-screen comment display layer, and then the thirdlayer of the guest bullet-screen comment display layer displays a type Dof middle autumn special effect bullet-screen comment display form. TheD type of middle autumn special effect bullet-screen comment is a purpleand thick-white bullet-screen comment with a moonlit decorative patternbetween words, and a width of the bullet-screen comment display track is140 px. The widths of the bullet-screen comment display tracks in thethree layers of guest bullet-screen comment display layers areinconsistent, thereby implementing a sparse visual effect of the upperand lower layers compared with the middle layer.

Step S210: Determine bullet-screen comment display track information ofthe to-be-displayed bullet-screen comment.

Step S212: Determine, from at least one preset bullet-screen commentdisplay track according to the bullet-screen comment display trackinformation, the target bullet-screen comment display track associatedwith the to-be-displayed bullet-screen comment.

In an exemplary embodiment, the bullet-screen comment display trackselection manner of the bullet-screen comment D is determined as randomselection according to the bullet-screen comment display trackinformation indication related to the bullet-screen comment D.Therefore, a bullet-screen comment display track is randomly selectedfrom the third layer of the guest bullet-screen comment display layer,and is determined as the target bullet-screen comment display track.

Step S214: Detect whether a displayed bullet-screen comment exists inthe target bullet-screen comment display track.

If yes, perform step S216.

If no, perform step S218.

In an exemplary embodiment, it is determined that a bullet-screencomment being displayed exists in the bullet-screen comment displaytrack corresponding to the bullet-screen comment D. Therefore, next stepS216 is performed.

Step S216: Detect whether there is a bullet-screen comment overlap areabetween the displayed bullet-screen comment and the to-be-displayedbullet-screen comment.

If yes, perform step S224.

If no, perform step S218.

As shown in a schematic diagram of a same-track insertion rule shown inFIG. 5 , between the two bullet-screen comments 1 and 2, as shown in agroup of bullet-screen comments 1 and 2 on the left in the figure, whenan end moment of 1<a head arrival moment of 2, 2 is allowed to bedisplayed. Otherwise, as shown in a group of bullet-screen comments 1and 2 on the right in the figure, when the end moment of 1 is not lessthan the head arrival moment of 2, 2 is discarded.

Based on this determining, there is no overlap area between thebullet-screen comment D and the displayed bullet-screen comment, andstep 218 is performed.

Step S218: Determine a bullet-screen comment display rule and abullet-screen comment movement rule that are corresponding to the targetbullet-screen comment display track.

Step S220: Update display information of the to-be-displayedbullet-screen comment based on the bullet-screen comment display rule,and update movement information of the to-be-displayed bullet-screencomment based on the bullet-screen comment movement rule to obtain athird target bullet-screen comment.

Based on this, the display information and the movement information ofthe bullet-screen comment D are updated by using the bullet-screencomment display rule and the bullet-screen comment movement rule thatare corresponding to the target bullet-screen comment display track, toobtain the third target bullet-screen comment. When the displayinformation is updated, the display information of the bullet-screencomment D is updated to the bullet-screen comment display rule D. Whenthe movement information is updated, a schematic diagram of abullet-screen comment movement rule shown in FIG. 6 is used to calculatelateral and longitudinal movement distances and a movement velocity ofthe bullet-screen comment. It may be learned, by means of calculation,that the bullet-screen comment D is in the third layer of the guestbullet-screen comment display layer, the movement velocity of thebullet-screen comment D in the vertical direction is 180 px/s, thehorizontal direction initial velocity is 0, the acceleration directionis right, and the size is 200 px/s². Finally, the bullet-screen commentD is displayed in a horizontal parabola form such as a track G in thethird layer of the guest bullet-screen comment display layer.

Step S222: Display the third target bullet-screen comment in the targetbullet-screen comment display layer.

Step S224: Delete the to-be-displayed bullet-screen comment.

The bullet-screen comment display method provided in this applicationincludes: receiving a to-be-displayed bullet-screen comment; determininga target bullet-screen comment display layer and a target bullet-screencontinent display track that are associated with the to-be-displayedbullet-screen comment; and displaying the to-be-displayed bullet-screencomment based on the target bullet-screen comment display layer and thetarget bullet-screen comment display track. Therefore, theto-be-displayed bullet-screen comment can effectively use a display areaof the bullet-screen comment, reduce poor perception caused bybullet-screen comment overlap, save bullet-screen comment processingresources, and improve working efficiency of a bullet-screen commentprocessing program or apparatus. In addition, different display rulescan be configured in different bullet-screen comment display layers andbullet-screen comment display tracks, so that display positions anddisplay forms of the bullet-screen comment are diversified, therebyenriching bullet-screen comment display effects.

Corresponding to the foregoing method embodiments, this applicationfurther provides some embodiments of a bullet-screen comment displayapparatus. FIG. 7 is a schematic diagram of a structure of abullet-screen comment display apparatus according to some embodiments ofthis application. As shown in FIG. 7 , the apparatus includes:

-   -   a receiving module 702, configured to receive a to-be-displayed        bullet-screen comment;    -   a determining module 704, configured to determine a target        bullet-screen comment display layer and a target bullet-screen        comment display track that are associated with the        to-be-displayed bullet-screen comment; and    -   a display module 706, configured to display, in the target        bullet-screen comment display layer, the to-be-displayed        bullet-screen comment based on the target bullet-screen comment        display track.

In an optional embodiment, the determining module 704 is furtherconfigured to:

-   -   determine bullet-screen comment state information of the        to-be-displayed bullet-screen comment; and determine, from at        least one preset bullet-screen comment display layer according        to the bullet-screen comment state information, the target        bullet-screen comment display layer associated with the        to-be-displayed bullet-screen comment.

In an optional embodiment, the determining module 704 is furtherconfigured to:

-   -   determine an obtaining path of the to-be-displayed bullet-screen        comment; and determine the bullet-screen comment state        information of the to-be-displayed bullet-screen comment based        on the obtaining path; and correspondingly, the determining,        according to the bullet-screen comment state information, the        target bullet-screen comment display layer associated with the        to-be-displayed bullet-screen comment includes: in a case in        which the bullet-screen comment state information is guest        bullet-screen comment state information, selecting a guest        bullet-screen comment display layer associated with the        to-be-displayed bullet-screen comment as the target        bullet-screen comment display layer; and in a case in which the        bullet-screen comment state information is host bullet-screen        comment state information, selecting a host bullet-screen        comment display layer associated with the to-be-displayed        bullet-screen comment as the target bullet-screen comment        display layer.

In an optional embodiment, the determining module 704 is furtherconfigured to:

-   -   determine bullet-screen comment display track information of the        to-be-displayed bullet-screen comment; and determine, from at        least one preset bullet-screen comment display track according        to the bullet-screen comment display track information, the        target bullet-screen comment display track associated with the        to-be-displayed bullet-screen comment.

In an optional embodiment, the display module 706 is further configuredto:

-   -   determine a bullet-screen comment display rule corresponding to        the target bullet-screen comment display track; update        bullet-screen comment size information, bullet-screen comment        font information, bullet-screen comment color information, and        bullet-screen comment configuration information of the        to-be-displayed bullet-screen comment based on the bullet-screen        comment display rule, to obtain a first target bullet-screen        comment; and display the first target bullet-screen comment in        the target bullet-screen comment display layer.

In an optional embodiment, the display module 706 is further configuredto:

-   -   determine a bullet-screen comment movement rule corresponding to        the target bullet-screen comment display track; update        bullet-screen comment velocity information, bullet-screen        comment acceleration information, and bullet-screen comment        angular velocity information of the to-be-displayed        bullet-screen comment based on the bullet-screen comment        movement rule, to obtain a second target bullet-screen comment;        and display the second target bullet-screen comment in the        target bullet-screen comment display layer.

In an optional embodiment, the display module 706 is further configuredto:

-   -   determine a bullet-screen comment display rule and a        bullet-screen comment movement rule that are corresponding to        the target bullet-screen comment display track; update display        information of the to-be-displayed bullet-screen comment based        on the bullet-screen comment display rule, and update movement        information of the to-be-displayed bullet-screen comment based        on the bullet-screen comment movement rule to obtain a third        target bullet-screen comment; and display the third target        bullet-screen comment in the target bullet-screen comment        display layer.

In an optional embodiment, the bullet-screen comment display apparatusfurther includes:

-   -   a detection module, configured to detect whether a displayed        bullet-screen comment exists in the target bullet-screen comment        display track; if a displayed bullet-screen comment does not        exist, perform the step of displaying, in the target        bullet-screen comment display layer, the to-be-displayed        bullet-screen comment based on the target bullet-screen comment        display track; if a displayed bullet-screen comment exists,        detect whether there is a bullet-screen comment overlap area        between the displayed bullet-screen comment and the        to-be-displayed bullet-screen comment; if no, perform the step        of displaying, in the target bullet-screen comment display        layer, the to-be-displayed bullet-screen comment based on the        target bullet-screen comment display track; and if yes, delete        the to-be-displayed bullet-screen comment.

In an optional embodiment, the bullet-screen comment display apparatusfurther includes:

-   -   a configuration module, configured to receive bullet-screen        comment display rule information and bullet-screen comment        display layer information that are delivered by a server;        creating a bullet-screen comment display layer and a        bullet-screen comment display track in the bullet-screen comment        display layer according to the bullet-screen comment display        layer information; and configure a rule for the bullet-screen        comment display layer and a corresponding bullet-screen comment        display track based on the bullet-screen comment display rule        information.

In an optional embodiment, the bullet-screen comment display apparatusfurther includes:

-   -   a determining module, configured to: determine a display policy        for the to-be-displayed bullet-screen comment, and determine        whether the display policy is a target display policy; if yes,        perform a step of determining a target bullet-screen comment        display layer and a target bullet-screen comment display track        that are associated with the to-be-displayed bullet-screen        comment; and if no, process and display the to-be-displayed        bullet-screen comment according to the display policy.

According to the bullet-screen comment display apparatus provided inthis application, the to-be-displayed bullet-screen comment caneffectively use a display area of the bullet-screen comment, reduce poorperception caused by bullet-screen comment overlap, save bullet-screencomment processing resources, and improve working efficiency of abullet-screen comment processing program or apparatus. In addition,different display rules can be configured in different bullet-screencomment display layers and bullet-screen comment display tracks, so thatdisplay positions and display forms of the bullet-screen comment arediversified, thereby enriching bullet-screen comment display effects.

The foregoing describes a schematic solution of the bullet-screencomment display apparatus in the embodiments. It is worthwhile to notethat the technical solution of the bullet-screen comment displayapparatus and the technical solution of the foregoing bullet-screencomment display method belong to the same concept. For details notdescribed in the technical solution of the bullet-screen comment displayapparatus, references can be made to the descriptions of the technicalsolution of the foregoing bullet-screen comment display method.

FIG. 8 is a block diagram of a structure of a computing device 800according to some embodiments of this application. Components of thecomputing device 800 include but are not limited to a memory 810 and aprocessor 820. The processor 820 and the memory 810 are connected byusing a bus 830, and a database 850 is configured to store data.

The computing device 800 further includes an access device 840, and theaccess device 840 enables the computing device 800 to communicate viaone or more networks 860. Examples of these networks include a publicswitched telephone network (PSTN), a local area network (LAN), a widearea network (WAN), a private area network (PAN), or a combination ofcommunication networks such as the Internet. The access device 840 mayinclude one or more of any type of wired or wireless network interface(for example, a network interface card (NIC)), for example, an IEEE802.11 wireless local area network (WLAN) wireless interface, aworldwide interoperability for microwave access (WiMAX) interface, anEthernet interface, a universal serial bus (USB) interface, a cellularnetwork interface, a Bluetooth interface, and a near field communication(NFC) interface.

In some embodiments of this application, the foregoing components of thecomputing device 800 and other components not shown in FIG. 8 may alsobe connected to each other, for example, by using the bus. It should beunderstood that the block diagram of the structure of the computingdevice shown in FIG. 8 is merely used as an example instead of alimitation on the scope of this application. A person skilled in the artmay add or substitute other components as required.

The computing device 800 may be any type of still or mobile computingdevice, including a mobile computer or a mobile computing device (forexample, a tablet computer, a personal digital assistant, a laptopcomputer, a notebook computer, or a netbook), a mobile phone (forexample, a smartphone), a wearable computing device (for example, asmart watch or smart glasses), another type of mobile device, or a stillcomputing device such as a desktop computer or a personal computer (PC).The computing device 800 may be a mobile or still server.

The processor 820 performs the steps of the bullet-screen commentdisplay method when executing the instructions.

The foregoing describes a schematic solution of a computing device inthe embodiments. It should be noted that the technical solution of thecomputing device and the technical solution of the bullet-screen commentdisplay method belong to a same concept. For details not described indetail in the technical solution of the computing device, refer to thedescriptions of the technical solution of the bullet-screen commentdisplay method.

Some embodiments of this application further provide a computer-readablestorage medium, where the computer-readable storage medium storescomputer instructions, and when the instructions are executed by aprocessor, the steps of the bullet-screen comment display method areimplemented.

The foregoing describes a schematic solution of a computer-readablestorage medium in the embodiments. It should be noted that the technicalsolution of the storage medium and the technical solution of thebullet-screen comment display method belong to a same concept. Fordetails not described in detail in the technical solution of the storagemedium, refer to the descriptions of the technical solution of thebullet-screen comment display method.

Exemplary embodiments of this application are described above. Otherembodiments fall within the scope of the appended claims. In some cases,the actions or steps recorded in the claims can be performed in an orderdifferent from the order in the embodiments and the desired results canstill be achieved. In addition, the process depicted in the accompanyingdrawings does not necessarily require the shown particular executionorder to achieve the desired results. In some implementations,multi-tasking and parallel processing can or may be advantageous.

The computer instructions include computer program code. The computerprogram code may be in a source code form, an object code form, anexecutable file form, an intermediate form, or the like. Thecomputer-readable medium may include: any physical entity or apparatuscapable of carrying the computer program code, a recording medium, a USBdisk, a mobile hard disk drive, a magnetic disk, an optical disc, acomputer memory, a read-only memory (ROM), a random access memory (RAM),an electrical carrier signal, a telecommunications signal, a softwaredistribution medium, and the like. It is worthwhile to note that contentincluded in the computer-readable medium may be appropriately added ordeleted according to the demands of legislation and patent practice in ajurisdiction, for example, in some jurisdictions, according tolegislation and patent practice, the computer-readable medium includesneither an electrical carrier signal nor a telecommunications signal.

It is worthwhile to note that, for ease of description, the foregoingmethod embodiments are described as a combination of a series ofactions. However, a person skilled in the art should understand thatthis application is not limited to the described action sequence,because according to this application, some steps may be performed inanother order or simultaneously. In addition, a person skilled in theart should also understand that the embodiments described in thespecification are all exemplary embodiments, and involved actions andmodules are not necessarily mandatory to this application.

In the foregoing embodiments, descriptions of the embodiments haverespective focuses, For a part that is not described in detail in someembodiments, references can be made to related descriptions in anotherembodiment.

The embodiments of this application disclosed above are merely intendedto help describe this application. The optional embodiments do notdescribe all details, and the present invention is not limited to thespecific implementations. Clearly, many modifications and changes may bemade based on the content of this application. These embodiments areselected and specifically described in this application to betterexplain the principle and the actual application of this application, sothat a person skilled in the art can better understand and use thisapplication. This application is only subjected to the claims and thescope and equivalents thereof.

What is claimed is:
 1. A method, comprising: receiving a to-be-displayedbullet-screen comment; determining a target bullet-screen commentdisplay layer and a target bullet-screen comment display track that areassociated with the to-be-displayed bullet-screen comment; anddisplaying, in the target bullet-screen comment display layer, theto-be-displayed bullet-screen comment based on the target bullet-screencomment display track.
 2. The method according to claim 1, whereindetermining the target bullet-screen comment display layer associatedwith the to-be-displayed bullet-screen comment comprises: determiningbullet-screen comment state information of the to-be-displayedbullet-screen comment; and determining, from at least one presetbullet-screen comment display layer, the target bullet-screen commentdisplay layer associated with the to-be-displayed bullet-screen commentaccording to the bullet-screen comment state information.
 3. The methodaccording to claim 2, wherein determining the bullet-screen commentstate information of the to-be-displayed bullet-screen commentcomprises: determining an obtaining path of the to-be-displayedbullet-screen comment; and determining the bullet-screen comment stateinformation of the to-be-displayed bullet-screen comment based on theobtaining path; and wherein determining the target bullet-screen commentdisplay layer associated with the to-be-displayed bullet-screen commentaccording to the bullet-screen comment state information comprises: ifthe bullet-screen comment state information is guest bullet-screencomment state information, selecting a guest bullet-screen commentdisplay layer associated with the to-be-displayed bullet-screen commentas the target bullet-screen comment display layer; and if thebullet-screen comment state information is host bullet-screen commentstate information, selecting a host bullet-screen comment display layerassociated with the to-be-displayed bullet-screen comment as the targetbullet-screen comment display layer.
 4. The method according to claim 1,wherein determining the target bullet-screen comment display trackassociated with the to-be-displayed bullet-screen comment comprises:determining bullet-screen comment display track information of theto-be-displayed bullet-screen comment; and determining, from at leastone preset bullet-screen comment display track, the target bullet-screencomment display track associated with the to-be-displayed bullet-screencomment according to the bullet-screen comment display trackinformation.
 5. The method according to claim 1, wherein displaying theto-be-displayed bullet-screen comment based on the target bullet-screencomment display track comprises: determining a bullet-screen commentdisplay rule corresponding to the target bullet-screen comment displaytrack; updating bullet-screen comment size information, bullet-screencomment font information, bullet-screen comment color information, andbullet-screen comment configuration information of the to-be-displayedbullet-screen comment based on the bullet-screen comment display rule,to obtain a first target bullet-screen comment; and displaying the firsttarget bullet-screen comment in the target bullet-screen comment displaylayer.
 6. The method according to claim 1, wherein displaying theto-be-displayed bullet-screen comment based on the target bullet-screencomment display track comprises: determining a bullet-screen commentmovement rule corresponding to the target bullet-screen comment displaytrack; updating bullet-screen comment velocity information,bullet-screen comment acceleration information, and bullet-screencomment angular velocity information of the to-be-displayedbullet-screen comment based on the bullet-screen comment movement rule,to obtain a second target bullet-screen comment; and displaying thesecond target bullet-screen comment in the target bullet-screen commentdisplay layer.
 7. The method according to claim 1, wherein displayingthe to-be-displayed bullet-screen comment based on the targetbullet-screen comment display track comprises: determining abullet-screen comment display rule and a bullet-screen comment movementrule that correspond to the target bullet-screen comment display track;updating display information of the to-be-displayed bullet-screencomment based on the bullet-screen comment display rule and updatingmovement information of the to-be-displayed bullet-screen comment basedon the bullet-screen comment movement rule, to obtain a third targetbullet-screen comment; and displaying the third target bullet-screencomment in the target bullet-screen comment display layer.
 8. The methodaccording to claim 1, wherein before the displaying, in the targetbullet-screen comment display layer, the to-be-displayed bullet-screencomment based on the target bullet-screen comment display track, themethod further comprises: detecting whether there is a displayedbullet-screen comment in the target bullet-screen comment display track;in response to detecting that there is no displayed bullet-screencomment in the target bullet-screen comment display track, displaying,in the target bullet-screen comment display layer, the to-be-displayedbullet-screen comment based on the target bullet-screen comment displaytrack; in response to detecting that there is a displayed bullet-screencomment in the target bullet-screen comment display track, detectingwhether there is a bullet-screen comment overlap area between thedisplayed bullet-screen comment and the to-be-displayed bullet-screencomment; in response to detecting that there is no bullet-screen commentoverlap area between the displayed bullet-screen comment and theto-be-displayed bullet-screen comment, displaying, in the targetbullet-screen comment display layer, the to-be-displayed bullet-screencomment based on the target bullet-screen comment display track; and inresponse to detecting that there is a bullet-screen comment overlap areabetween the displayed bullet-screen comment and the to-be-displayedbullet-screen comment, deleting the to-be-displayed bullet-screencomment.
 9. The method according to claim 1, wherein before determiningthe target bullet-screen comment display layer and the targetbullet-screen comment display track that are associated with theto-be-displayed bullet-screen comment, the method comprises: receivingbullet-screen comment display rule information and bullet-screen commentdisplay layer information from a server; creating a bullet-screencomment display layer and a bullet-screen comment display track in thebullet-screen comment display layer according to the bullet-screencomment display layer information; and configuring a rule for thebullet-screen comment display layer and a corresponding bullet-screencomment display track based on the bullet-screen comment display ruleinformation.
 10. The method according to claim 1, wherein afterreceiving the to-be-displayed bullet-screen comment, the method furthercomprises: determining a display policy for the to-be-displayedbullet-screen comment; determining whether the display policy is atarget display policy; in response to determining that the displaypolicy is the target display policy, determining the targetbullet-screen comment display layer and the target bullet-screen commentdisplay track that are associated with the to-be-displayed bullet-screencomment; and in response to determining that the display policy is notthe target display policy, processing and displaying the to-be-displayedbullet-screen comment according to the display policy.
 11. A computerdevice, comprising: a processor; and a memory, wherein the memory storescomputer executable instructions that, when executed by the processor,cause the processor to: receive a to-be-displayed bullet-screen comment;determine a target bullet-screen comment display layer and a targetbullet-screen comment display track that are associated with theto-be-displayed bullet-screen comment; and display, in the targetbullet-screen comment display layer, the to-be-displayed bullet-screencomment based on the target bullet-screen comment display track.
 12. Thecomputer device according to claim 11, wherein determining the targetbullet-screen comment display layer associated with the to-be-displayedbullet-screen comment comprises: determining bullet-screen comment stateinformation of the to-be-displayed bullet-screen comment; anddetermining, from at least one preset bullet-screen comment displaylayer, the target bullet-screen comment display layer associated withthe to-be-displayed bullet-screen comment according to the bullet-screencomment state information.
 13. The computer device according to claim12, wherein determining the bullet-screen comment state information ofthe to-be-displayed bullet-screen comment comprises: determining anobtaining path of the to-be-displayed bullet-screen comment; anddetermining the bullet-screen comment state information of theto-be-displayed bullet-screen comment based on the obtaining path; andwherein determining the target bullet-screen comment display layerassociated with the to-be-displayed bullet-screen comment according tothe bullet-screen comment state information comprises: if thebullet-screen comment state information is guest bullet-screen commentstate information, selecting a guest bullet-screen comment display layerassociated with the to-be-displayed bullet-screen comment as the targetbullet-screen comment display layer; and if the bullet-screen commentstate information is host bullet-screen comment state information,selecting a host bullet-screen comment display layer associated with theto-be-displayed bullet-screen comment as the target bullet-screencomment display layer.
 14. The computer device according to claim 11,wherein determining the target bullet-screen comment display trackassociated with the to-be-displayed bullet-screen comment comprises:determining bullet-screen comment display track information of theto-be-displayed bullet-screen comment; and determining, from at leastone preset bullet-screen comment display track, the target bullet-screencomment display track associated with the to-be-displayed bullet-screencomment according to the bullet-screen comment display trackinformation.
 15. The computer device according to claim 11, whereindisplaying the to-be-displayed bullet-screen comment based on the targetbullet-screen comment display track comprises: determining abullet-screen comment display rule corresponding to the targetbullet-screen comment display track; updating bullet-screen comment sizeinformation, bullet-screen comment font information, bullet-screencomment color information, and bullet-screen comment configurationinformation of the to-be-displayed bullet-screen comment based on thebullet-screen comment display rule, to obtain a first targetbullet-screen comment; and displaying the first target bullet-screencomment in the target bullet-screen comment display layer. 16.Anon-transitory computer-readable storage medium storing computerinstructions that, when executed by a processor, cause the processor to:receive a to-be-displayed bullet-screen comment; determine a targetbullet-screen comment display layer and a target bullet-screen commentdisplay track that are associated -with the to-be-displayedbullet-screen comment; and display, in the target bullet-screen commentdisplay layer, the to-be-displayed bullet-screen comment based on thetarget bullet-screen comment display track.
 17. The non-transitorycomputer-readable storage medium according to claim 16, whereindetermining the target bullet-screen comment display layer associatedwith the to-be-displayed bullet-screen comment comprises: determiningbullet-screen comment state information of the to-be-displayedbullet-screen comment; and determining, from at least one presetbullet-screen comment display layer, the target bullet-screen commentdisplay layer associated with the to-be-displayed bullet-screen commentaccording to the bullet-screen comment state information.
 18. Thenon-transitory computer-readable storage medium according to claim 17,wherein determining the bullet-screen comment state information of theto-be-displayed bullet-screen comment comprises: determining anobtaining path of the to-be-displayed bullet-screen comment; anddetermining the bullet-screen comment state information of theto-be-displayed bullet-screen comment based on the obtaining path; andwherein determining the target bullet-screen comment display layerassociated with the to-be-displayed bullet-screen comment according tothe bullet-screen comment state information comprises: if thebullet-screen comment state information is guest bullet-screen commentstate information, selecting a guest bullet-screen comment display layerassociated with the to-be-displayed bullet-screen comment as the targetbullet-screen comment display layer; and if the bullet-screen commentstate information is host bullet-screen comment state information,selecting a host bullet-screen comment display layer associated with theto-be-displayed bullet-screen comment as the target bullet-screencomment display layer.
 19. The non-transitory computer-readable storagemedium according to claim 16, wherein determining the targetbullet-screen comment display track associated with the to-be-displayedbullet-screen comment comprises: determining bullet-screen commentdisplay track information of the to-be-displayed bullet-screen comment;and determining, from at least one preset bullet-screen comment displaytrack, the target bullet-screen comment display track associated withthe to-be-displayed bullet-screen comment according to the bullet-screencomment display track information.
 20. The non-transitorycomputer-readable storage medium according to claim 16, whereindisplaying the to-be-displayed bullet-screen comment based on the targetbullet-screen comment display track comprises: determining abullet-screen comment display rule corresponding to the targetbullet-screen comment display track; updating bullet-screen comment sizeinformation, bullet-screen comment font information, bullet-screencomment color information, and bullet-screen comment configurationinformation of the to-be-displayed bullet-screen comment based on thebullet-screen comment display rule, to obtain a first targetbullet-screen comment; and displaying the first target bullet-screencomment in the target bullet-screen comment display layer.